package cn.funnyxb.tools.appFrame.activityFrame;

import android.os.AsyncTask;
import android.os.AsyncTask.Status;
import java.util.ArrayList;
import java.util.Iterator;

public abstract class AbstractProccessor
{
  private ArrayList<AsyncTask<?, ?, ?>> tasks = new ArrayList();

  public void cancelAllAsyncTask()
  {
    Iterator localIterator = this.tasks.iterator();
    while (true)
    {
      if (!(localIterator.hasNext()))
        return;
      AsyncTask localAsyncTask = (AsyncTask)localIterator.next();
      try
      {
        if (!(localAsyncTask.getStatus().equals(AsyncTask.Status.FINISHED)));
        localAsyncTask.cancel(true);
      }
      catch (Exception localException)
      {
      }
    }
  }

  public void regAsyncTask(AsyncTask<?, ?, ?> paramAsyncTask)
  {
    this.tasks.add(paramAsyncTask);
  }

  public void releaseResource()
  {
    cancelAllAsyncTask();
  }

  public void unRegAsyncTask(AsyncTask<?, ?, ?> paramAsyncTask)
  {
    this.tasks.remove(paramAsyncTask);
  }
}

/* Location:           E:\Desktop\复件 classes_dex2jar.jar
 * Qualified Name:     cn.funnyxb.tools.appFrame.activityFrame.AbstractProccessor
 * JD-Core Version:    0.5.3
 */